import { defineColumns } from "@hanyk/v3-form"
import selectData from '../data.json'

const groupProps = {
  label: '',
  labelWidth: '0px',
  style: {
    paddingBottom: '2px'
  }
}
const bingshiSelectProps = {
  columns: selectData.bingshi
}
export const columns = defineColumns([
  {
    field: 'group1',
    ...groupProps
  },
  {
    label: '医院:',
    el: 'Select',
    field: 'hospital',
    rules: {
      required: true,
      message: '请选择医院'
    },
    props: {
      placeholder: '请选择',
      columns: selectData.hospital
    }
  },


  {
    label: '姓名:',
    el: 'Input',
    field: 'name',
    props: {
      placeholder: '请输入'
    },
    rules: {
      required: true,
      message: '请输入姓名'
    }
  },
  {
    label: '姓名缩写:',
    el: 'Input',
    field: 'englishName',
    props: {
      placeholder: '请输入'
    },
    rules: {
      required: true,
      message: '请输入姓名缩写'
    }
  },
  {
    label: '填报员:',
    el: 'Input',
    field: 'operator',
    props: {
      placeholder: '请输入'
    },
    rules: {
      required: true,
      message: '请输入填报员'
    }
  }, {
    label: '就诊日期:',
    el: 'DatePicker',
    field: 'visitdate',
    rules: {
      required: true,
      message: '请选择就诊日期'
    },
    props: {
      placeholder: '请选择就诊日期',
    }
  },
  {
    label: '性别:',
    el: 'Radio',
    field: 'gender',
    props: {
      placeholder: '请选择',
      direction: 'horizontal',
      columns: selectData.gender
    },
    rules: {
      required: true,
      message: '请选择性别'
    }
  },
  {
    label: '民族:',
    el: 'Select',
    field: 'nation',
    props: {
      placeholder: '请选择',
      columns: selectData.nation
    },
    rules: {
      required: true,
      message: '请选择性别'
    }
  },
  {
    label: '文化程度:',
    el: 'Select',
    field: 'degree',
    props: {
      placeholder: '请选择',
      columns: selectData.degree
    },
    rules: {
      required: true,
      message: '请选择性别'
    }
  },
  {
    label: '婚姻状况:',
    el: 'Select',
    field: 'marry',
    props: {
      placeholder: '请选择',
      columns: selectData.marry
    },
    rules: {
      required: true,
      message: '请选择婚姻状况'
    }
  },
  {
    label: '电话:',
    el: 'Input',
    field: 'phone',
    props: {
      placeholder: '请输入'
    },
    rules: {
      required: true,
      message: '请输入本人电话'
    }
  },
  {
    label: '年龄:',
    el: 'Input',
    field: 'age',
    props: {
      placeholder: '请输入'
    },
    rules: {
      required: true,
      message: '请输入年龄'
    }
  },

  {
    label: '身高:',
    el: 'Input',
    field: 'height',
    props: {
      placeholder: '请输入'
    },
    rules: {
      required: true,
      message: '请输入身高'
    },
    slots: {
      'right-icon': '厘米'
    }
  },
  {
    label: '体重:',
    el: 'Input',
    field: 'weight',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': '千克'
    },
    rules: {
      required: true,
      message: '请输入体重'
    }
  },
  {
    label: '体重指数(BMI):',
    field: 'bmi',
    el: 'Input',
    props: {
      readonly: true
    },
    slots: {
      'right-icon': 'kg/m2'
    }
  },
  {
    field: 'group2',
    ...groupProps
  },
  {
    label: '第一次测量',
    el: 'Input',
    field: 'bloodHeart1',
    props: {
      placeholder: '收缩压-舒张压～心率'
    },
    rules: {
      required: true,
      message: '请输入血压和心率'
    }
  },
  {
    label: '第二次测量',
    el: 'Input',
    field: 'bloodHeart2',
    props: {
      placeholder: '收缩压-舒张压～心率'
    }
  }, {
    label: '第三次测量',
    el: 'Input',
    field: 'bloodHeart3',
    props: {
      placeholder: '收缩压-舒张压～心率'
    }
  },
  {
    field: 'group3',
    ...groupProps
  },
  {
    label: '24小时测量:',
    el: 'Input',
    field: 'dynamicBloodAll',
    props: {
      placeholder: '收缩压-舒张压～心率'
    }
  },{
    label: '清晨血压平均值:',
    el: 'Input',
    field: 'avgblood',
    props: {
      placeholder: '请输入'
    }
  },
  {
    label: '白天测量:',
    el: 'Input',
    field: 'dynamicBloodDay',
    props: {
      placeholder: '收缩压-舒张压～心率'
    }
  },
  {
    label: '夜晚测量:',
    el: 'Input',
    field: 'dynamicBloodNight',
    props: {
      placeholder: '收缩压-舒张压～心率'
    }
  },
  {
    field: 'group4',
    ...groupProps
  },
  {
    label: '高血压:',
    el: 'Radio',
    field: 'gaoxueya',
    props: bingshiSelectProps
  },
  {
    label: '糖尿病:',
    el: 'Radio',
    field: 'tangniaobing',
    props: bingshiSelectProps
  },
  {
    label: '早发CVD:',
    el: 'Radio',
    field: 'zaofaCVD',
    props: bingshiSelectProps
  },
  {
    label: '血脂异常:',
    el: 'Radio',
    field: 'xuezhi',
    props: bingshiSelectProps
  },
  {
    label: '糖代谢异常:',
    el: 'Radio',
    field: 'tangdaixie',
    props: bingshiSelectProps
  },
  {
    label: '冠心病:',
    el: 'Radio',
    field: 'guanxinbing',
    props: bingshiSelectProps
  },
  {
    label: '心力衰竭:',
    el: 'Radio',
    field: 'xinlishuaijie',
    props: bingshiSelectProps
  },
  {
    label: '肾脏疾病:',
    el: 'Radio',
    field: 'shenzang',
    props: bingshiSelectProps
  },
  {
    label: '脑血管病:',
    el: 'Radio',
    field: 'naoxueguan',
    props: bingshiSelectProps
  },
  {
    label: '贫血:',
    el: 'Radio',
    field: 'pinxue',
    props: bingshiSelectProps
  },
  {
    label: '高钾:',
    el: 'Radio',
    field: 'gaojia',
    props: bingshiSelectProps
  },
  {
    label: '外周血管疾病:',
    el: 'Radio',
    field: 'waizhouxueguan',
    props: bingshiSelectProps
  },
  {
    field: 'group5',
    ...groupProps
  },
  {
    label: '血钾（K+）:',
    el: 'Input',
    field: 'xuejia',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mmol/L'
    }
  },
  {
    label: '血钠（Na+):',
    el: 'Input',
    field: 'xuena',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mmol/L'
    }
  },
  {
    label: '血肌酐（Cr):',
    el: 'Input',
    field: 'xuejigan',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'umol/L'
    }
  },
  {
    label: '估算的肾小球滤过率（eGFR）',
    el: 'Input',
    field: 'shenxiaoqiu',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mL/(min*1.73m2)'
    }
  },
  {
    label: '尿酸（UA）:',
    el: 'Input',
    field: 'niaosuan',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'umol/L'
    }
  },
  {
    label: '尿素（Urea):',
    el: 'Input',
    field: 'niaosu',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mmol/L'
    }
  },
  {
    label: '总胆固醇（TC）:',
    el: 'Input',
    field: 'zongdanguchun',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mmol/L'
    }
  },
  {
    label: '甘油三酯（TG）:',
    el: 'Input',
    field: 'ganyousanzhi',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mmol/L'
    }
  },
  {
    label: '低密度脂蛋白胆固醇（LDL-C）:',
    el: 'Input',
    field: 'ldlc',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mmol/L'
    }
  },
  {
    label: '高密度脂蛋白胆固醇（HDL-C）:',
    el: 'Input',
    field: 'hdlc',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mmol/L'
    }
  },
  {
    label: '空腹血糖:',
    el: 'Input',
    field: 'kongfuxuetang',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mmol/L'
    }
  },
  {
    label: '糖化血红蛋白（HbA1C):',
    el: 'Input',
    field: 'xuehongdanbai',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': '%'
    }
  },
  {
    label: '尿微量白蛋白/尿白蛋白:',
    el: 'Input',
    field: 'niaobaidanbai',
    props: {
      placeholder: '请输入'
    },
    slots: {
      // 'right-icon': '%'
    }
  },
  {
    label: '尿白蛋白肌酐比（uACR):',
    el: 'Input',
    field: 'niaobaidanbaijiganbi',
    props: {
      placeholder: '请输入'
    },
    slots: {
      'right-icon': 'mg/g'
    }
  },
  {
    field: 'group6',
    ...groupProps
  },
  {
    el: 'Input',
    field: 'diagnose',
    props: {
      placeholder: '填写完整的疾病诊断',
      rows: 5,
      type: 'textarea',
      showWordLimit: true,
      maxlength: 500,
      autosize: true
    }
  },
  {
    field: 'group7',
    ...groupProps
  },
  {
    label: '高血压用药',
    field: 'gaoxueyayao',
    el: 'Input',
    props: {
      placeholder: '请输入'
    }
  },
  {
    label: '抗血小板药',
    field: 'kangxuexiaobanyao',
    el: 'Input',
    props: {
      placeholder: '请输入'
    }
  },
  {
    label: '调脂药物',
    field: 'tiaozhiyao',
    el: 'Input',
    props: {
      placeholder: '请输入'
    }
  },
  {
    label: '降糖药物',
    field: 'jiangtangyao',
    el: 'Input',
    props: {
      placeholder: '请输入'
    }
  },
  {
    label: 'CKD的药物治疗',
    field: 'ckdyao',
    el: 'Input',
    props: {
      placeholder: '请输入'
    }
  },
  {
    label: '抗凝药物',
    field: 'kangningyao',
    el: 'Input',
    props: {
      placeholder: '请输入'
    }
  },
  {
    label: '心衰治疗药物',
    field: 'xinshuaiyao',
    el: 'Input',
    props: {
      placeholder: '请输入'
    }
  },
  {
    label: '其他',
    field: 'other',
    el: 'Input',
    props: {
      placeholder: '请输入'
    }
  }
])

export const defaultValues = {
  waizhouxueguan: '否',
  gaoxueya: '否',
  tangniaobing: '否',
  zaofaCVD: '否',
  xuezhi: '否',
  tangdaixie: '否',
  guanxinbing: '否',
  xinlishuaijie: '否',
  shenzang: '否',
  naoxueguan: '否',
  pinxue: '否',
  gaojia: '否',
  gaoxueyayao: '无',
  kangxuexiaobanyao: '无',
  tiaozhiyao: '无',
  jiangtangyao: '无',
  ckdyao: '无',
  kangningyao: '无',
  xinshuaiyao: '无',
  other: '无',
  height: undefined,
  weight: undefined,
  bmi: ''
}